<template>
  <n-card class="cardbg" content-style="padding:0.75rem;">
    <template v-if="cfg.user?.uid != null">
      <template v-if="cfg.function.ckqx('idc')" >你已经拥有攻略组权限，不需要继承。</template>
      <template v-else>
        <n-h3>请点击下方链接获取V6旧攻略站的转移密钥</n-h3>
        <n-hr/>
        <a href="https://dx35.ww2.ren/member.php?mod=logging&action=login&referer=https://dx35.ww2.ren/maolin_v6.php" target="_blank">https://dx35.ww2.ren/member.php?mod=logging&action=login&referer=https://dx35.ww2.ren/maolin_v6.php</a>
        <n-hr/>
        <n-input v-model:value="val.zykey" placeholder="请输入转移密钥" />
        <n-hr/>
        <n-button @click="ct.old(val.zykey)" >验证密钥</n-button>
      </template>
    </template>
    <template v-else>
        <n-h3>请登录后继承旧站攻略组权限（账号不互通）</n-h3>
      <n-button @click="$cfg.loginif = true" >登录账号</n-button>
    </template>
  </n-card>
</template>

<script>
import { cfg } from "@/cfg/cfg.js";

export default {
  props: {
    val: {
      required: true,
    },
    ct: {
      required: true,
    },
  },
  setup(props) {
    onMounted(async () => {});

    return {
      cfg,
      val : props.val,
      ct : props.ct,
    };
  },
};
</script>
